#include<iostream>
using CStrRef = const std::string &;
class Person
{
    public:
        Person() : name(""), age(0), ID("") {}
        Person(CStrRef name, int age, CStrRef ID) : name(name), age(age), ID(ID) {std::cout << "父类构造函数\n"; }
        void show()
        {
            std::cout << "名字：" << name << " 年龄：" << age << " 身份证：" << ID << std::endl;
        }
        ~Person(){
            std::cout << "父类析构函数\n";
        }
    protected:
        std::string name;
        int age;
        std::string ID;
};
class Student:public Person
{
    public:
         Student(CStrRef name, int age, CStrRef ID,int score):Person(name,age,ID),score(score)
         {
            std::cout << "子类构造函数\n";
            
         }
        ~Student()
        {
             std::cout << "子类析构函数\n";
        }
        void show()
        {
            Person::show();
            std::cout << "分数：" << score << std::endl;
        }

    private:

        int score;
};
int main()
{
    Student s("zhangsan", 20, "123", 99);
    s.show();
    return 0;
}